/*
Navicat SQL Server Data Transfer

Source Server         : NHAHV-PC
Source Server Version : 90000
Source Host           : NHAHV-PC\SQLEXPRESS:1433
Source Database       : CollegeWebsite
Source Schema         : dbo

Target Server Type    : SQL Server
Target Server Version : 90000
File Encoding         : 65001

Date: 2012-05-03 14:07:37
*/


-- ----------------------------
-- Table structure for [dbo].[Admins]
-- ----------------------------
DROP TABLE [dbo].[Admins]
GO
CREATE TABLE [dbo].[Admins] (
[AdminID] int NOT NULL IDENTITY(1,1) ,
[UserName] varchar(50) NOT NULL ,
[PassWord] varchar(32) NOT NULL ,
[AdminName] nvarchar(100) NOT NULL ,
[Status] bit NOT NULL DEFAULT ((1)) 
)


GO

-- ----------------------------
-- Records of Admins
-- ----------------------------
SET IDENTITY_INSERT [dbo].[Admins] ON
GO
SET IDENTITY_INSERT [dbo].[Admins] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[Admissions]
-- ----------------------------
DROP TABLE [dbo].[Admissions]
GO
CREATE TABLE [dbo].[Admissions] (
[AdmissionID] int NOT NULL IDENTITY(1,1) ,
[CourseID] int NULL ,
[StudentID] int NULL ,
[Status] bit NOT NULL DEFAULT ((0)) 
)


GO
DBCC CHECKIDENT(N'[dbo].[Admissions]', RESEED, 7)
GO

-- ----------------------------
-- Records of Admissions
-- ----------------------------
SET IDENTITY_INSERT [dbo].[Admissions] ON
GO
INSERT INTO [dbo].[Admissions] ([AdmissionID], [CourseID], [StudentID], [Status]) VALUES (N'1', N'1', N'1', N'1');
GO
INSERT INTO [dbo].[Admissions] ([AdmissionID], [CourseID], [StudentID], [Status]) VALUES (N'2', N'1', N'21', N'0');
GO
INSERT INTO [dbo].[Admissions] ([AdmissionID], [CourseID], [StudentID], [Status]) VALUES (N'3', N'1', N'22', N'0');
GO
INSERT INTO [dbo].[Admissions] ([AdmissionID], [CourseID], [StudentID], [Status]) VALUES (N'4', N'1', N'23', N'0');
GO
INSERT INTO [dbo].[Admissions] ([AdmissionID], [CourseID], [StudentID], [Status]) VALUES (N'5', N'1', N'24', N'0');
GO
INSERT INTO [dbo].[Admissions] ([AdmissionID], [CourseID], [StudentID], [Status]) VALUES (N'6', N'1', N'25', N'0');
GO
INSERT INTO [dbo].[Admissions] ([AdmissionID], [CourseID], [StudentID], [Status]) VALUES (N'7', N'1', N'26', N'0');
GO
SET IDENTITY_INSERT [dbo].[Admissions] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[Contacts]
-- ----------------------------
DROP TABLE [dbo].[Contacts]
GO
CREATE TABLE [dbo].[Contacts] (
[ContactID] int NOT NULL IDENTITY(1,1) ,
[ContactName] nvarchar(250) NOT NULL ,
[ContactAddress] nvarchar(500) NULL ,
[ContactPhone] nvarchar(20) NULL ,
[ContactEmail] nvarchar(100) NULL ,
[ContactFax] nvarchar(20) NULL ,
[ContactStatus] bit NULL ,
[DepartmentID] int NULL 
)


GO

-- ----------------------------
-- Records of Contacts
-- ----------------------------
SET IDENTITY_INSERT [dbo].[Contacts] ON
GO
SET IDENTITY_INSERT [dbo].[Contacts] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[Courses]
-- ----------------------------
DROP TABLE [dbo].[Courses]
GO
CREATE TABLE [dbo].[Courses] (
[CourseID] int NOT NULL IDENTITY(1,1) ,
[DepartmentID] int NULL ,
[CourseName] nvarchar(50) NULL ,
[CourseCapicity] int NULL ,
[CourseFee] float(53) NULL ,
[Status] bit NOT NULL DEFAULT ((1)) 
)


GO
DBCC CHECKIDENT(N'[dbo].[Courses]', RESEED, 2)
GO

-- ----------------------------
-- Records of Courses
-- ----------------------------
SET IDENTITY_INSERT [dbo].[Courses] ON
GO
INSERT INTO [dbo].[Courses] ([CourseID], [DepartmentID], [CourseName], [CourseCapicity], [CourseFee], [Status]) VALUES (N'1', N'1', N'Cerificate', N'100', N'100', N'1');
GO
INSERT INTO [dbo].[Courses] ([CourseID], [DepartmentID], [CourseName], [CourseCapicity], [CourseFee], [Status]) VALUES (N'2', N'1', N'Dilopma', N'100', N'100', N'1');
GO
SET IDENTITY_INSERT [dbo].[Courses] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[Departments]
-- ----------------------------
DROP TABLE [dbo].[Departments]
GO
CREATE TABLE [dbo].[Departments] (
[DepartmentID] int NOT NULL IDENTITY(1,1) ,
[DepartmentName] nvarchar(50) NULL ,
[DepartmentDescription] nvarchar(MAX) NULL ,
[Status] bit NOT NULL DEFAULT ((1)) ,
[FacultyID] int NOT NULL DEFAULT ((0)) 
)


GO
DBCC CHECKIDENT(N'[dbo].[Departments]', RESEED, 2)
GO

-- ----------------------------
-- Records of Departments
-- ----------------------------
SET IDENTITY_INSERT [dbo].[Departments] ON
GO
INSERT INTO [dbo].[Departments] ([DepartmentID], [DepartmentName], [DepartmentDescription], [Status], [FacultyID]) VALUES (N'1', N'Architecture', N'Architecture', N'1', N'1');
GO
INSERT INTO [dbo].[Departments] ([DepartmentID], [DepartmentName], [DepartmentDescription], [Status], [FacultyID]) VALUES (N'2', N'History of Art', N'History of Art', N'1', N'1');
GO
SET IDENTITY_INSERT [dbo].[Departments] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[Facilities]
-- ----------------------------
DROP TABLE [dbo].[Facilities]
GO
CREATE TABLE [dbo].[Facilities] (
[FacilityID] int NOT NULL IDENTITY(1,1) ,
[FacilityName] nvarchar(100) NULL ,
[FacilityDescription] nvarchar(MAX) NULL ,
[FacilityCapicity] int NULL ,
[FacilityFee] float(53) NULL 
)


GO

-- ----------------------------
-- Records of Facilities
-- ----------------------------
SET IDENTITY_INSERT [dbo].[Facilities] ON
GO
SET IDENTITY_INSERT [dbo].[Facilities] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[Faculties]
-- ----------------------------
DROP TABLE [dbo].[Faculties]
GO
CREATE TABLE [dbo].[Faculties] (
[FacultyID] int NOT NULL IDENTITY(1,1) ,
[FacultyName] nvarchar(50) NOT NULL ,
[FacultyDesciption] nvarchar(MAX) NULL ,
[Status] bit NOT NULL DEFAULT ((0)) 
)


GO
DBCC CHECKIDENT(N'[dbo].[Faculties]', RESEED, 2)
GO

-- ----------------------------
-- Records of Faculties
-- ----------------------------
SET IDENTITY_INSERT [dbo].[Faculties] ON
GO
INSERT INTO [dbo].[Faculties] ([FacultyID], [FacultyName], [FacultyDesciption], [Status]) VALUES (N'1', N'Architecture & History of Art', N'<div id="content-core">
                                
    
        
        <div class="" id="parent-fieldname-text-5d204ad5cf21245606fe2c91dcd6b3a2">
            <p>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <img src="http://www.aha.cam.ac.uk/images/Scroopebanner.jpg/image_preview" alt="Scroope banner" title="Scroope banner" width="505" height="170">&nbsp;</p>
<p>The Faculty of Architecture &amp; History of Art consists of two departments: Architecture and History of Art.</p>
<p>The Faculty provides a number of key resources to both departments, including the library and administration.</p>
<p>For admissions and other departmental information see the web sites for Architecture and History of Art</p>
<p><a class="external-link" href="http://www.arct.cam.ac.uk/">Architecture website&nbsp;</a></p>
<p><a class="external-link" href="http://www.hoart.cam.ac.uk/">History of Art website</a></p>
            
        </div>
    
    

                            </div>', N'1');
GO
INSERT INTO [dbo].[Faculties] ([FacultyID], [FacultyName], [FacultyDesciption], [Status]) VALUES (N'2', N'Economics', null, N'0');
GO
SET IDENTITY_INSERT [dbo].[Faculties] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[FeedBacks]
-- ----------------------------
DROP TABLE [dbo].[FeedBacks]
GO
CREATE TABLE [dbo].[FeedBacks] (
[FeedBackId] int NOT NULL IDENTITY(1,1) ,
[FromName] nvarchar(50) NOT NULL ,
[FromEmail] nvarchar(100) NOT NULL ,
[FeedSubject] nvarchar(200) NOT NULL ,
[FeedContent] nvarchar(500) NOT NULL ,
[FeedBackRespond] nvarchar(500) NULL ,
[FeedBackStatus] bit NOT NULL DEFAULT ((0)) ,
[FeedBackDate] datetime NOT NULL DEFAULT (getdate()) 
)


GO

-- ----------------------------
-- Records of FeedBacks
-- ----------------------------
SET IDENTITY_INSERT [dbo].[FeedBacks] ON
GO
SET IDENTITY_INSERT [dbo].[FeedBacks] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[Menus]
-- ----------------------------
DROP TABLE [dbo].[Menus]
GO
CREATE TABLE [dbo].[Menus] (
[MenuID] int NOT NULL IDENTITY(1,1) ,
[ParentID] int NOT NULL DEFAULT ((0)) ,
[Level] int NULL DEFAULT ((0)) ,
[MenuName] nvarchar(50) NOT NULL ,
[TextContent] nvarchar(100) NOT NULL ,
[Link] nvarchar(200) NULL ,
[Icons] nvarchar(200) NULL ,
[Publish] bit NOT NULL DEFAULT ((0)) 
)


GO

-- ----------------------------
-- Records of Menus
-- ----------------------------
SET IDENTITY_INSERT [dbo].[Menus] ON
GO
SET IDENTITY_INSERT [dbo].[Menus] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[StudentFacility]
-- ----------------------------
DROP TABLE [dbo].[StudentFacility]
GO
CREATE TABLE [dbo].[StudentFacility] (
[FacilityID] int NOT NULL ,
[StudentID] int NOT NULL ,
[StudentFacilityID] int NOT NULL IDENTITY(1,1) 
)


GO

-- ----------------------------
-- Records of StudentFacility
-- ----------------------------
SET IDENTITY_INSERT [dbo].[StudentFacility] ON
GO
SET IDENTITY_INSERT [dbo].[StudentFacility] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[StudentPreviousInfomations]
-- ----------------------------
DROP TABLE [dbo].[StudentPreviousInfomations]
GO
CREATE TABLE [dbo].[StudentPreviousInfomations] (
[PreviousInfomationID] int NOT NULL IDENTITY(1,1) ,
[StudentID] int NOT NULL ,
[University] nvarchar(250) NULL ,
[EnrollmentNo] int NULL ,
[Center] nchar(10) NULL ,
[Stream] nchar(10) NULL ,
[Field] nchar(10) NULL ,
[MarksSecured] nchar(10) NULL ,
[OutOfDate] datetime NULL ,
[ClassObitained] nchar(10) NULL ,
[Status] bit NOT NULL 
)


GO
DBCC CHECKIDENT(N'[dbo].[StudentPreviousInfomations]', RESEED, 11)
GO

-- ----------------------------
-- Records of StudentPreviousInfomations
-- ----------------------------
SET IDENTITY_INSERT [dbo].[StudentPreviousInfomations] ON
GO
INSERT INTO [dbo].[StudentPreviousInfomations] ([PreviousInfomationID], [StudentID], [University], [EnrollmentNo], [Center], [Stream], [Field], [MarksSecured], [OutOfDate], [ClassObitained], [Status]) VALUES (N'8', N'25', N'123', N'11', N'123       ', N'111       ', N'111       ', N'111       ', N'2012-05-09 00:00:00.000', N'111       ', N'0');
GO
INSERT INTO [dbo].[StudentPreviousInfomations] ([PreviousInfomationID], [StudentID], [University], [EnrollmentNo], [Center], [Stream], [Field], [MarksSecured], [OutOfDate], [ClassObitained], [Status]) VALUES (N'9', N'25', N'123', N'22', N'123       ', N'111       ', N'111       ', N'111       ', N'2012-05-09 00:00:00.000', N'111       ', N'0');
GO
INSERT INTO [dbo].[StudentPreviousInfomations] ([PreviousInfomationID], [StudentID], [University], [EnrollmentNo], [Center], [Stream], [Field], [MarksSecured], [OutOfDate], [ClassObitained], [Status]) VALUES (N'10', N'25', N'123', N'33', N'123       ', N'111       ', N'111       ', N'111       ', N'2012-05-09 00:00:00.000', N'111       ', N'0');
GO
SET IDENTITY_INSERT [dbo].[StudentPreviousInfomations] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[Students]
-- ----------------------------
DROP TABLE [dbo].[Students]
GO
CREATE TABLE [dbo].[Students] (
[StudentID] int NOT NULL IDENTITY(1,1) ,
[StudentName] nvarchar(50) NULL ,
[FatherName] nvarchar(50) NULL ,
[MotherName] nvarchar(50) NULL ,
[PIN] varchar(20) NOT NULL ,
[DateOfBirth] datetime NULL ,
[Gender] bit NOT NULL DEFAULT ((0)) ,
[ResidentialAddress] nvarchar(200) NULL ,
[PermanentAddress] nvarchar(200) NULL ,
[SupportDetails] nvarchar(500) NULL ,
[Status] bit NOT NULL DEFAULT ((1)) 
)


GO
DBCC CHECKIDENT(N'[dbo].[Students]', RESEED, 26)
GO

-- ----------------------------
-- Records of Students
-- ----------------------------
SET IDENTITY_INSERT [dbo].[Students] ON
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'1', N'Hoang', N'Nha', N'Van', N'VNM-123-131-23123', N'2012-05-09 00:00:00.000', N'1', N'123213123', N'123', N'123123', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'2', N'ádf', N'ádfasdfasf', N'ádfasdf', N'VNM-232-342-34234', N'2012-05-09 00:00:00.000', N'1', N'23423423423', N'234234234', N'234234234234', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'4', N'123123', N'123', N'123', N'VNM-123-234-42131', N'2012-05-02 00:00:00.000', N'1', N'12341234', N'12341243', N'123412341234', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'5', N'123123', N'123', N'123', N'VNM-123-234-44213', N'2012-05-02 00:00:00.000', N'1', N'12341234', N'12341243', N'123412341234', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'6', N'123123', N'123', N'123', N'VNM-123-234-44421', N'2012-05-02 00:00:00.000', N'1', N'12341234', N'12341243', N'123412341234', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'7', N'123123', N'123', N'123', N'VNM-123-234-44452', N'2012-05-02 00:00:00.000', N'1', N'12341234', N'12341243', N'123412341234', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'8', N'123123', N'123', N'123', N'VNM-123-234-44455', N'2012-05-02 00:00:00.000', N'1', N'12341234', N'12341243', N'123412341234', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'9', N'123123', N'123', N'123', N'VNM-123-234-44445', N'2012-05-02 00:00:00.000', N'1', N'12341234', N'12341243', N'123412341234', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'10', N'123123', N'123', N'123', N'VNM-123-234-44454', N'2012-05-02 00:00:00.000', N'1', N'12341234', N'12341243', N'123412341234', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'11', N'Trần kave', N'Fuck ', N'Shit', N'VNM-000-000-00001', N'1996-05-30 00:00:00.000', N'1', N'ưerwerewr', null, null, N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'12', N'Trần kave', N'Fuck ', N'Shit', N'VNM-000-000-00002', N'1996-05-30 00:00:00.000', N'1', N'ưerwerewr', null, null, N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'13', N'qưe', N'qưeqwewqe', N'qưee', N'VNM-000-000-00011', N'2012-05-10 00:00:00.000', N'1', N'13123123', N'123123', N'123123123', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'14', N'qưe', N'qưeqwewqe', N'qưee', N'VNM-000-000-00012', N'2012-05-10 00:00:00.000', N'1', N'13123123', N'123123', N'123123123', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'15', N'qưe', N'qưeqwewqe', N'qưee', N'VNM-000-000-00013', N'2012-05-10 00:00:00.000', N'1', N'13123123', N'123123', N'123123123', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'16', N'qưe', N'qưeqwewqe', N'qưee', N'VNM-000-000-00014', N'2012-05-10 00:00:00.000', N'1', N'13123123', N'123123', N'123123123', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'17', N'qưe', N'qưeqwewqe', N'qưee', N'VNM-000-000-00015', N'2012-05-10 00:00:00.000', N'1', N'13123123', N'123123', N'123123123', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'18', N'qưe', N'qưeqwewqe', N'qưee', N'VNM-000-000-00016', N'2012-05-10 00:00:00.000', N'1', N'13123123', N'123123', N'123123123', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'19', N'qưe', N'qưeqwewqe', N'qưee', N'VNM-000-000-00017', N'2012-05-10 00:00:00.000', N'1', N'13123123', N'123123', N'123123123', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'20', N'qưe', N'qưeqwewqe', N'qưee', N'VNM-000-000-00018', N'2012-05-10 00:00:00.000', N'1', N'13123123', N'123123', N'123123123', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'21', N'qưe', N'qưeqwewqe', N'qưee', N'VNM-000-000-00019', N'2012-05-10 00:00:00.000', N'1', N'13123123', N'123123', N'123123123', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'22', N'qưe', N'qưeqwewqe', N'qưee', N'VNM-000-000-00020', N'2012-05-10 00:00:00.000', N'1', N'13123123', N'123123', N'123123123', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'23', N'qưe', N'qưeqwewqe', N'qưee', N'VNM-000-000-00021', N'2012-05-10 00:00:00.000', N'1', N'13123123', N'123123', N'123123123', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'24', N'qưe', N'qưeqwewqe', N'qưee', N'VNM-000-000-00022', N'2012-05-10 00:00:00.000', N'1', N'13123123', N'123123', N'123123123', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'25', N'qưe', N'qưeqwewqe', N'qưee', N'VNM-000-000-00023', N'2012-05-10 00:00:00.000', N'1', N'13123123', N'123123', N'123123123', N'0');
GO
INSERT INTO [dbo].[Students] ([StudentID], [StudentName], [FatherName], [MotherName], [PIN], [DateOfBirth], [Gender], [ResidentialAddress], [PermanentAddress], [SupportDetails], [Status]) VALUES (N'26', N'qưe', N'qưeqwewqe', N'qưee', N'VNM-000-000-00024', N'2012-05-10 00:00:00.000', N'1', N'13123123', N'123123', N'123123123', N'0');
GO
SET IDENTITY_INSERT [dbo].[Students] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[StudentSubject]
-- ----------------------------
DROP TABLE [dbo].[StudentSubject]
GO
CREATE TABLE [dbo].[StudentSubject] (
[StudentSubjectID] int NOT NULL IDENTITY(1,1) ,
[StudentID] int NULL ,
[SubjectID] int NOT NULL 
)


GO

-- ----------------------------
-- Records of StudentSubject
-- ----------------------------
SET IDENTITY_INSERT [dbo].[StudentSubject] ON
GO
SET IDENTITY_INSERT [dbo].[StudentSubject] OFF
GO

-- ----------------------------
-- Table structure for [dbo].[Subjects]
-- ----------------------------
DROP TABLE [dbo].[Subjects]
GO
CREATE TABLE [dbo].[Subjects] (
[SubjectID] int NOT NULL IDENTITY(1,1) ,
[SubjectName] nvarchar(150) NULL ,
[SujectDescription] nvarchar(250) NULL ,
[CourseID] varchar(150) NULL ,
[Status] bit NULL 
)


GO

-- ----------------------------
-- Records of Subjects
-- ----------------------------
SET IDENTITY_INSERT [dbo].[Subjects] ON
GO
SET IDENTITY_INSERT [dbo].[Subjects] OFF
GO

-- ----------------------------
-- Indexes structure for table Admins
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[Admins]
-- ----------------------------
ALTER TABLE [dbo].[Admins] ADD PRIMARY KEY ([AdminID])
GO

-- ----------------------------
-- Uniques structure for table [dbo].[Admins]
-- ----------------------------
ALTER TABLE [dbo].[Admins] ADD UNIQUE ([UserName] ASC)
GO

-- ----------------------------
-- Indexes structure for table Admissions
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[Admissions]
-- ----------------------------
ALTER TABLE [dbo].[Admissions] ADD PRIMARY KEY ([AdmissionID])
GO

-- ----------------------------
-- Indexes structure for table Contacts
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[Contacts]
-- ----------------------------
ALTER TABLE [dbo].[Contacts] ADD PRIMARY KEY ([ContactID])
GO

-- ----------------------------
-- Indexes structure for table Courses
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[Courses]
-- ----------------------------
ALTER TABLE [dbo].[Courses] ADD PRIMARY KEY ([CourseID])
GO

-- ----------------------------
-- Indexes structure for table Departments
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[Departments]
-- ----------------------------
ALTER TABLE [dbo].[Departments] ADD PRIMARY KEY ([DepartmentID])
GO

-- ----------------------------
-- Indexes structure for table Facilities
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[Facilities]
-- ----------------------------
ALTER TABLE [dbo].[Facilities] ADD PRIMARY KEY ([FacilityID])
GO

-- ----------------------------
-- Indexes structure for table Faculties
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[Faculties]
-- ----------------------------
ALTER TABLE [dbo].[Faculties] ADD PRIMARY KEY ([FacultyID])
GO

-- ----------------------------
-- Indexes structure for table FeedBacks
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[FeedBacks]
-- ----------------------------
ALTER TABLE [dbo].[FeedBacks] ADD PRIMARY KEY ([FeedBackId])
GO

-- ----------------------------
-- Indexes structure for table Menus
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[Menus]
-- ----------------------------
ALTER TABLE [dbo].[Menus] ADD PRIMARY KEY ([MenuID])
GO

-- ----------------------------
-- Indexes structure for table StudentFacility
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[StudentFacility]
-- ----------------------------
ALTER TABLE [dbo].[StudentFacility] ADD PRIMARY KEY ([StudentFacilityID])
GO

-- ----------------------------
-- Indexes structure for table StudentPreviousInfomations
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[StudentPreviousInfomations]
-- ----------------------------
ALTER TABLE [dbo].[StudentPreviousInfomations] ADD PRIMARY KEY ([PreviousInfomationID])
GO

-- ----------------------------
-- Indexes structure for table Students
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[Students]
-- ----------------------------
ALTER TABLE [dbo].[Students] ADD PRIMARY KEY ([StudentID])
GO

-- ----------------------------
-- Uniques structure for table [dbo].[Students]
-- ----------------------------
ALTER TABLE [dbo].[Students] ADD UNIQUE ([PIN] ASC)
GO

-- ----------------------------
-- Indexes structure for table StudentSubject
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[StudentSubject]
-- ----------------------------
ALTER TABLE [dbo].[StudentSubject] ADD PRIMARY KEY ([StudentSubjectID])
GO

-- ----------------------------
-- Indexes structure for table Subjects
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table [dbo].[Subjects]
-- ----------------------------
ALTER TABLE [dbo].[Subjects] ADD PRIMARY KEY ([SubjectID])
GO

-- ----------------------------
-- Foreign Key structure for table [dbo].[Admissions]
-- ----------------------------
ALTER TABLE [dbo].[Admissions] ADD FOREIGN KEY ([CourseID]) REFERENCES [dbo].[Courses] ([CourseID]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO
ALTER TABLE [dbo].[Admissions] ADD FOREIGN KEY ([StudentID]) REFERENCES [dbo].[Students] ([StudentID]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO

-- ----------------------------
-- Foreign Key structure for table [dbo].[Courses]
-- ----------------------------
ALTER TABLE [dbo].[Courses] ADD FOREIGN KEY ([DepartmentID]) REFERENCES [dbo].[Departments] ([DepartmentID]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO

-- ----------------------------
-- Foreign Key structure for table [dbo].[Departments]
-- ----------------------------
ALTER TABLE [dbo].[Departments] ADD FOREIGN KEY ([FacultyID]) REFERENCES [dbo].[Faculties] ([FacultyID]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO

-- ----------------------------
-- Foreign Key structure for table [dbo].[StudentFacility]
-- ----------------------------
ALTER TABLE [dbo].[StudentFacility] ADD FOREIGN KEY ([FacilityID]) REFERENCES [dbo].[Facilities] ([FacilityID]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO
ALTER TABLE [dbo].[StudentFacility] ADD FOREIGN KEY ([StudentID]) REFERENCES [dbo].[Students] ([StudentID]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO

-- ----------------------------
-- Foreign Key structure for table [dbo].[StudentPreviousInfomations]
-- ----------------------------
ALTER TABLE [dbo].[StudentPreviousInfomations] ADD FOREIGN KEY ([StudentID]) REFERENCES [dbo].[Students] ([StudentID]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO

-- ----------------------------
-- Foreign Key structure for table [dbo].[StudentSubject]
-- ----------------------------
ALTER TABLE [dbo].[StudentSubject] ADD FOREIGN KEY ([StudentID]) REFERENCES [dbo].[Students] ([StudentID]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO
ALTER TABLE [dbo].[StudentSubject] ADD FOREIGN KEY ([SubjectID]) REFERENCES [dbo].[Subjects] ([SubjectID]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO
